Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Shannon Probabilistic Proofs #899

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

Olshansk
Copy link
Member

@Olshansk Olshansk commented Oct 30, 2024

⚠️ TO REVIEWERS: The only document that needs to be reviewed here is docusaurus/docs/protocol/primitives/probabilistic_proofs.md ⚠️

Summary

Document probabilistic proofs in Shannon.

This is needed to determine secure & scalable values for on-chain parameters for Beta TestNet and beyond.

Original source: https://github.com/pokt-network/pocket-core/tree/staging/doc/probabilistic_proofs

Issue

Type of change

Select one or more from the following:

@Olshansk Olshansk self-assigned this Oct 30, 2024
@Olshansk Olshansk added the documentation Improvements or additions to documentation label Oct 30, 2024
@Olshansk Olshansk added this to the Shannon Beta TestNet Launch milestone Oct 30, 2024
@Olshansk Olshansk changed the title [WIP] Probabilistic Proofs Doc [Docs] Shannon Probabilistic Proofs Oct 31, 2024
@Olshansk Olshansk marked this pull request as ready for review October 31, 2024 21:22
Copy link

gitguardian bot commented Nov 6, 2024

⚠️ GitGuardian has uncovered 4 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
13506804 Triggered Generic High Entropy Secret 13a5f50 localnet/kubernetes/config-path-1.yaml View secret
12819930 Triggered Generic Password 384d796 localnet/kubernetes/observability-prometheus-stack.yaml View secret
14150880 Triggered Generic High Entropy Secret 13a5f50 localnet/kubernetes/config-path-3.yaml View secret
14150881 Triggered Generic High Entropy Secret 13a5f50 localnet/kubernetes/config-path-2.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@Olshansk
Copy link
Member Author

Olshansk commented Nov 6, 2024

@RawthiL Friendly bump that this is on the backlog. Not urgent, but important.

Copy link

@RawthiL RawthiL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is an issue with how the slash is calculated, allowing attackers to spam without penalty.

@Olshansk
Copy link
Member Author

Adding a gist from @RawthiL for reference: https://gist.github.com/RawthiL/9ed65065b896d13e96dc2a5910f6a7ab

Copy link
Contributor

@red-0ne red-0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments and NITs that might become irrelevant by your planned rewrite.

Eager to read the next version 📖

@bryanchriswhite
Copy link
Contributor

👀

Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got to line 185 in probabilistic_proofs.md but have to call it quits for today. Will resume in the morning.

@Olshansk
Copy link
Member Author

@bryanchriswhite I'm going to favor "onchain" versus "on-chain" given this resource: https://x.com/jessepollak/status/1764742947218858477

Screenshot 2024-12-17 at 12 20 21 PM

Olshansk and others added 13 commits December 17, 2024 12:46
- [Analogs between Model Parameters and onchain Governance Values](#analogs-between-model-parameters-and-onchain-governance-values)
- [Parameter Analog for Penalty (`S`)](#parameter-analog-for-penalty-s)
- [Parameter Analog for Reward (`R`)](#parameter-analog-for-reward-r)
- [TODO_IN_THIS_PR: Explain `p`](#todo_in_this_pr-explain-p)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
- TODO_IN_THIS_PR: Explain p

- [Selecting `ProofRequirementThreshold`](#selecting-proofrequirementthreshold)
- [Calculating `p`: `ProofRequestProbability`](#calculating-p-proofrequestprobability)
- [Calculating `S`: `ProofMissingPenalty`](#calculating-s-proofmissingpenalty)
- [TODO_IN_THIS_PR: Above Threshold Attack Possibility](#todo_in_this_pr-above-threshold-attack-possibility)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
- TODO_IN_THIS_PR: Above Threshold Attack Possibility


$$ E[\text{Total Profit}_{\text{Dishonest}}] = R \cdot \frac{q}{p} - S = 0 $$

TODO_IN_THIS_PR, incorporate feedback from ramiro:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
TODO_IN_THIS_PR, incorporate feedback from ramiro:


:::danger

TODO_IN_THIS_PR: Honest faulty suppliers will also be affectd and peanlized,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
TODO_IN_THIS_PR: Honest faulty suppliers will also be affectd and peanlized,


Therefore, `R` can be assumed constant when determining the optimal `p` and `S`.

### TODO_IN_THIS_PR: Explain `p`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
### TODO_IN_THIS_PR: Explain p


### Considerations during Parameter Adjustment

TODO_IN_THIS_PR: Add a mermaid diagram for this.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
TODO_IN_THIS_PR: Add a mermaid diagram for this.


#### Selecting Optimal `p` and `S`

TODO_IN_THIS_PR: Add a mermaid diagram for this.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
TODO_IN_THIS_PR: Add a mermaid diagram for this.


$$ S = R \cdot E[K] = 20 \cdot 99 = 1980 ≈ 2,000 $$

## TODO_IN_THIS_PR: Above Threshold Attack Possibility

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[linter-name (fail-on-found)] reported by reviewdog 🐶
## TODO_IN_THIS_PR: Above Threshold Attack Possibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

4 participants